<?php

use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        $arr = [];
        for($i=0;$i<50;$i++){
        	$tmp = [];
        	//随机一个1位数的字符串
        	$tmp['username'] = str_random(10);
        	$tmp['password'] = Hash::make('lamp159');
        	$tmp['email'] = rand(1000000,9999999).'@qq.com';
        	$tmp['profile'] = '/Uploads/20161116614846.jpg';
        	$tmp['sex'] = rand(0,1);
        	$tmp['status'] = rand(0,1);
        	$arr[] = $tmp;
        }
       DB::table('user')->insert($arr);
    }
}
